home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / telecomm / flashdoc.lzh / VARTUTOR.DO < prev    next >
Text File  |  1992-02-20  |  1KB  |  68 lines

  1. >** - top of file - |
  2. >**
  3.  
  4. vartutor.do - V. 1.0.0 - 02/21/92.
  5.  
  6. By Al Fasoldt.
  7.  
  8.  
  9. A script written to show how variables can be manipulated. 
  10. Please do not edit this using word wrap. This has not been fully 
  11. debugged, and is nothing more than an interesting classroom 
  12. exercise.
  13.  
  14. |
  15.  
  16. >L: top|
  17. >ty  |
  18. >qu "Type the directory|to use as the default:" $X 1|
  19. >if X jmp TestforColon|
  20. >al "[3][You did not type anything.|Try again?][Yes|No]" $X 1|
  21. >ifi $X "No" end|
  22. >jmp top|
  23. >L: TestforColon|
  24. >$Y &$X@|
  25. >ifi $Y :@ jmp ColonOK|
  26.  
  27. >** etc.|
  28.  
  29. >$X |
  30. >al "[3][Your directory name|MUST include a colon!][Sorry!|Quit]" $X 1|
  31. >ifi $X "Quit" end|
  32. >jmp top|
  33. >L: ColonOK|
  34. >$Y _$X_|
  35. >ifi $Y "_\" jmp LeadingSlash|
  36. >ifi $Y "$X_" jmp Trailing Slash|
  37. >ty  ------------------------------|
  38. >ty|
  39. >ty You typed $X.|
  40. >ty|
  41. >ty ------------------------------|
  42. >ty|
  43. >ca on|>ca cl|
  44. >log "xxxxxxxx"|
  45. >sa ca $X\test.dat|
  46. >ca cl|
  47. >op $X\test.dat|
  48. >if ~op jmp TryPath2|
  49. >$Y $X\|
  50. >$X $Y|
  51. >jmp PathOK|
  52. >L: TryPath2|
  53. >sa ca \$X\test.dat|
  54. >ca cl|
  55. >op \$X\test.dat|
  56. >if ~op jmp NoPath|
  57. >$Y \$X\|
  58. >$X $Y|
  59. >jmp PathOK|
  60. >L: NoPath|
  61. >al "[3][That directory|does not exist!][Ooops!]" 1 $A|
  62. >jmp top|
  63. >L: pathOK|
  64. >al "[2][Is this OK?][Yes|No][1]" $Y|
  65. >ifi $Y "No" jmp top|
  66. >$Z _$Y&|
  67. >end|
  68.